﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
      Id="P3ToolsTab.AutoTag"
      RegistrationId="101"
      RegistrationType="List"
      Location="CommandUI.Ribbon">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.Templates._children">
          <GroupTemplate  Id="Ribbon.Templates.AutoTagTemplate">
            <Layout
              Title="OneLargeTwoMedium"
              LayoutTitle="OneLargeTwoMedium">
              <Section  Alignment="Top" Type="OneRow">
                <Row>
                  <ControlRef  DisplayMode="Large" TemplateAlias="AutoTagTemplate" />
                </Row>
              </Section>
            </Layout>
          </GroupTemplate>
        </CommandUIDefinition>
        <CommandUIDefinition Location="Ribbon.P3ToolsTab.Scaling._children">
          <MaxSize
            Id="Ribbon.P3ToolsTab.Documents.MaxSize"
  Sequence="65"
  GroupId="Ribbon.P3ToolsTab.AutoTag"
  Size="OneLargeTwoMedium" />

        </CommandUIDefinition>
        <CommandUIDefinition Location="Ribbon.P3ToolsTab.Groups._children">
          <Group
            Id="Ribbon.P3ToolsTab.AutoTag"
            Description="Configuring Auto Tag"
            Title="Tag Configuration"
            Sequence="52"
            Template="Ribbon.Templates.AutoTagTemplate">
            <Controls  Id="Ribbon.P3ToolsTab.AutoTag.Controls">
              <Button
                 Id="Ribbon.P3ToolsTab.AutoTag.AutoTagButton"
                 Command="P3ToolsTab.AutoTagCommand"
                 Sequence="15"
                 Description="Configuring Auto Tag"
                 Alt="Auto Tag Config"
                 LabelText="Auto Tagging Config"
                 Image32by32="/_layouts/images/SocialTagsAndNotes_32.png"
                 TemplateAlias="AutoTagTemplate"/>
            </Controls>

          </Group>

        </CommandUIDefinition>

      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
            Command="P3ToolsTab.AutoTagCommand"
             CommandAction="javascript:ConfigTag();"  />
      </CommandUIHandlers>

    </CommandUIExtension>

  </CustomAction>

  <CustomAction
 Location="ScriptLink"
   ScriptSrc ="~site/_layouts/P3.Modules.SharePoint.AutoTag/Script/TaggingConfig.js"/>



</Elements>
